package cn.jxau.bean.po;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.KeySequence;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * 文章评论表
 * @author licho
 *
 */
@TableName("t_article_comment")
@KeySequence("t_sequence_article_comment")
public class ArticleComment implements Serializable {
	
	private static final long serialVersionUID = 1L;
	@TableId(type=IdType.INPUT)
	private Long id;//主键
	private Long userID;//评论者ID
	private Long articleID;//文章ID
	private String content;//评论内容
	private Date tdate;//评论日期
	private User userinfo; //评论者信息
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getUserID() {
		return userID;
	}
	public void setUserID(Long userID) {
		this.userID = userID;
	}
	public Long getArticleID() {
		return articleID;
	}
	public void setArticleID(Long articleID) {
		this.articleID = articleID;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getTdate() {
		return tdate;
	}
	public void setTdate(Date tdate) {
		this.tdate = tdate;
	}
	public User getUserinfo() {
		return userinfo;
	}
	public void setUserinfo(User userinfo) {
		this.userinfo = userinfo;
	}
	@Override
	public String toString() {
		return "ArticleComment [id=" + id + ", userID=" + userID + ", articleID=" + articleID + ", content=" + content
				+ ", tdate=" + tdate + ", userinfo=" + userinfo + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((articleID == null) ? 0 : articleID.hashCode());
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((tdate == null) ? 0 : tdate.hashCode());
		result = prime * result + ((userID == null) ? 0 : userID.hashCode());
		result = prime * result + ((userinfo == null) ? 0 : userinfo.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ArticleComment other = (ArticleComment) obj;
		if (articleID == null) {
			if (other.articleID != null)
				return false;
		} else if (!articleID.equals(other.articleID))
			return false;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (tdate == null) {
			if (other.tdate != null)
				return false;
		} else if (!tdate.equals(other.tdate))
			return false;
		if (userID == null) {
			if (other.userID != null)
				return false;
		} else if (!userID.equals(other.userID))
			return false;
		if (userinfo == null) {
			if (other.userinfo != null)
				return false;
		} else if (!userinfo.equals(other.userinfo))
			return false;
		return true;
	}
	public ArticleComment(Long id, Long userID, Long articleID, String content, Date tdate, User userinfo) {
		super();
		this.id = id;
		this.userID = userID;
		this.articleID = articleID;
		this.content = content;
		this.tdate = tdate;
		this.userinfo = userinfo;
	}
	public ArticleComment() {
		super();
	}
	
	
}
